﻿namespace Ast.Core.WinApi
{
// ReSharper disable InconsistentNaming

    public static class Constant
    {
        // Service Types (Bit Mask)

        public const uint SERVICE_KERNEL_DRIVER = 0x00000001;

        public const uint SERVICE_FILE_SYSTEM_DRIVER = 0x00000002;

        public const uint SERVICE_ADAPTER = 0x00000004;

        public const uint SERVICE_RECOGNIZER_DRIVER = 0x00000008;

        public const uint SERVICE_WIN32_OWN_PROCESS = 0x00000010;

        public const uint SERVICE_WIN32_SHARE_PROCESS = 0x00000020;

        public const uint SERVICE_INTERACTIVE_PROCESS = 0x00000100;

        public const uint SERVICE_WIN32 = SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS;

        public const uint SERVICE_DRIVER = SERVICE_KERNEL_DRIVER | SERVICE_FILE_SYSTEM_DRIVER | SERVICE_RECOGNIZER_DRIVER;

        public const uint SERVICE_TYPE_ALL = SERVICE_WIN32 | SERVICE_ADAPTER | SERVICE_DRIVER | SERVICE_INTERACTIVE_PROCESS;


        // Start Type

        public const uint SERVICE_BOOT_START = 0x00000000;

        public const uint SERVICE_SYSTEM_START = 0x00000001;

        public const uint SERVICE_AUTO_START = 0x00000002;

        public const uint SERVICE_DEMAND_START = 0x00000003;

        public const uint SERVICE_DISABLED = 0x00000004;


        // Error control type

        public const uint SERVICE_ERROR_IGNORE = 0x00000000;

        public const uint SERVICE_ERROR_NORMAL = 0x00000001;

        public const uint SERVICE_ERROR_SEVERE = 0x00000002;

        public const uint SERVICE_ERROR_CRITICAL = 0x00000003;


        // Controls

        public const uint SERVICE_CONTROL_STOP = 0x00000001;

        public const uint SERVICE_CONTROL_PAUSE = 0x00000002;

        public const uint SERVICE_CONTROL_CONTINUE = 0x00000003;

        public const uint SERVICE_CONTROL_INTERROGATE = 0x00000004;

        public const uint SERVICE_CONTROL_SHUTDOWN = 0x00000005;


        // Service object specific access type

        public const uint SERVICE_QUERY_CONFIG = 0x0001;

        public const uint SERVICE_CHANGE_CONFIG = 0x0002;

        public const uint SERVICE_QUERY_STATUS = 0x0004;

        public const uint SERVICE_ENUMERATE_DEPENDENTS = 0x0008;

        public const uint SERVICE_START = 0x0010;

        public const uint SERVICE_STOP = 0x0020;

        public const uint SERVICE_ALL_ACCESS = 0xF01FF;

        
        // Service Control Manager object specific access types

        public const uint SC_MANAGER_ALL_ACCESS = 0xF003F;

        public const uint SC_MANAGER_CREATE_SERVICE = 0x0002;

        public const uint SC_MANAGER_CONNECT = 0x0001;

        public const uint SC_MANAGER_ENUMERATE_SERVICE = 0x0004;

        public const uint SC_MANAGER_LOCK = 0x0008;

        public const uint SC_MANAGER_MODIFY_BOOT_CONFIG = 0x0020;

        public const uint SC_MANAGER_QUERY_LOCK_STATUS = 0x0010;


        // These are the generic rights.

        public const uint GENERIC_READ = 0x80000000;

        public const uint GENERIC_WRITE = 0x40000000;

        public const uint GENERIC_EXECUTE = 0x20000000;

        public const uint GENERIC_ALL = 0x10000000;


        // Virtual key map type

        public const uint MAPVK_VK_TO_VSC = 0x00;

        public const uint MAPVK_VSC_TO_VK = 0x01;

        public const uint MAPVK_VK_TO_CHAR = 0x02;

        public const uint MAPVK_VSC_TO_VK_EX = 0x03;

        public const uint MAPVK_VK_TO_VSC_EX = 0x04;


        // Key flags

        public const ushort KeyMake = 0;

        public const ushort KeyBreak = 1;
    }

// ReSharper restore InconsistentNaming
}